package com.hqyj.module.index.controller;

import com.hqyj.module.index.pojo.DeptTime;
import com.hqyj.module.index.pojo.Honour;
import com.hqyj.module.index.service.DeptTimeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author lap
 * @version 1.0
 * @date 2021/10/9 10:12
 */
@RestController
@RequestMapping("/user-info")
public class DeptTimeController {
    @Autowired
    DeptTimeService deptTimeService;

    @GetMapping("/listDeptTime")
    public DeptTime listDeptTime(Integer userId) {
        char c = String.valueOf(userId).charAt(0);
        String likeDeptId = c+"%";
        DeptTime deptTimes = deptTimeService.listDeptTime(likeDeptId);
        return deptTimes;
    }
}
